var scrollFunc = function (e) {
    var direct = 0;
    //获得需要隐藏的iframe元素对象。
    var iframe = document.getElementById('myIframe');
    e = e || window.event;
    if (e.wheelDelta) {  //判断浏览器IE，谷歌滑轮事件             
        if (e.wheelDelta > 0) { //当滑轮向上滚动时
            iframe.style = "display:block";
            iframe.style = "margin-left: 50%";
        }
        if (e.wheelDelta < 0) { //当滑轮向下滚动时
            iframe.style = "display:none";
        }
    } else if (e.detail) {  //Firefox滑轮事件
        if (e.detail > 0) { //当滑轮向上滚动时
            iframe.style = "display:block";
            header.style = "margin-left: 50%";
        }
        if (e.detail < 0) { //当滑轮向下滚动时
            iframe.style = "display:none";
        }
    }
    ScrollText(direct);
}
if (document.addEventListener) {
    document.addEventListener('DOMMouseScroll', scrollFunc, false);
}
window.onmousewheel = document.onmousewheel = scrollFunc;  